package com.zx.zxojbackendjudge.codesandbox.impl;


import com.zx.zxojbackendjudge.codesandbox.CodeSandBox;
import com.zx.zxojbackendmodel.dto.judge.ExecuteCodeRequest;
import com.zx.zxojbackendmodel.dto.judge.ExecuteCodeResponse;
import com.zx.zxojbackendmodel.dto.judge.JudgeInfo;

/**
 * 示例代码沙箱
 */
public class ExampleCodeSandBox implements CodeSandBox {
    @Override
    public ExecuteCodeResponse executeCode(ExecuteCodeRequest executeCodeRequest) {
        System.out.println("示例代码沙箱");
        ExecuteCodeResponse executeCodeResponse = ExecuteCodeResponse.builder()
                .outputList(executeCodeRequest.getInputs())
                .message("代码沙箱执行成功")
                .judgeInfo(new JudgeInfo(null, 100L, 100L))
                .build();
        return executeCodeResponse;
    }
}
